package src.MidEx;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class PlaneFactory {
    private static Properties prop = new Properties();
    static{
        try{
            prop.load(new FileInputStream("src/MidEx/pl.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static Plane createPlane(){
        Plane pl=null;
        try{
            pl = (Plane) Class.forName(prop.getProperty("plName")).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return pl;
    }
}
